# -*- coding: utf-8 -*-
# @Time : 2023/11/20 9:23 PM 
# @Author : Wayne
# @Email : 1
# @File : dic_update.py
# @Project : young_python_demo
# @DESCRIPTION :

user_dic = {"name":"李四","age":18,"school":"科大"}

# 添加新属性
user_dic['gender'] = "1"

# 跟新某字段属性方式1
user_dic ['name'] = '王武'
# # 跟新某字段属性方式2
user_dic.update({"age":25})
# 丢弃前 {'name': '王武', 'age': 25, 'school': '科大', 'genger': '1'}
user_dic.pop("school")
# 丢弃后 {'name': '王武', 'age': 25, 'genger': '1'}

print(user_dic)


# 两个字典相加组成新字典
